#include<iostream>
#include<math.h>
#include<iomanip>
#include<string>

using namespace std;

int main()
{
	string s;
	cin >> s;
	//6a-5+1=2-2a;
	int eq_index = s.find("=");
	if (s[eq_index + 1] != '+' && s[eq_index + 1] != '-')
	{
		s.insert(eq_index + 1, "+");
	}
	if (s[0] != '+' && s[0] != '-')
	{
		s.insert(0, "+");
	}
	//+6a-5+1=+2-2a
	eq_index = s.find("=");
	for (int i = eq_index + 1; i < s.size(); i++)
	{
		if (s[i] == '+')	s[i] = '-';
		else if (s[i] == '-') s[i] = '+';
	}
	//+6a-5+1=-2+2a
	s.erase(eq_index, 1);
	//+6a-5+1-2+2a
	int j;
	string temp_string;
	double unkown = 0, num = 0, temp_double = 0;
	for (int i = 0; i < s.size(); i++)
	{
		if (s[i] == '+' || s[i] == '-')
		{
			j = i + 1;
			while (true)
			{
				if (s[j + 1] == '+' || s[j + 1] == '-' || j + 1 >= s.size()) break;
				j++;
			}
			temp_string = s.substr(i+1, j - i);
			if (temp_string.back() >= 'a' && temp_string.back() <= 'z')
			{
				temp_string.pop_back(); 
				if (temp_string.size() == 0) temp_double = 1;
				else temp_double = atof(temp_string.c_str());
				if (s[i] == '+') unkown += temp_double;
				else unkown -= temp_double;
			}
			else
			{
				temp_double = atof(temp_string.c_str());
				if (s[i] == '+') num += temp_double;
				else num -= temp_double;
			}
		}
	}
	
	char unkown_char;
	unkown_char = s[s.find_first_of("abcdefghijklmnopqrstuvwxyz")];
	if(num == 0) cout <<  unkown_char << "=" << fixed << setprecision(3) << num;
	else cout << unkown_char << "="<< fixed << setprecision(3) << (0 - num ) / unkown;
	return 0;
}